FIG. 25 of the attached drawings is a perspective view showing a complete view of a conventional automatic sewing machine. The reference numeral 1 denotes a machine table; 2, a needle bar; 3, a balance; 4, a drive motor; 5, sewing-machine mechanism section for converting rotational movement of the drive motor to vertical movement of the needle bar 2 or swinging movement of the balance 3; and 6, a detector mounted on an end of a spindle (not shown) of the sewing-machine mechanism section 5, for generating a signal in synchronization with rotation of the sewing machine. The detector 6 outputs a synchronizing signal, for example, a needle-lower-position signal in synchronization with every rotation of the sewing machine, and outputs pulse signals (hereinafter referred to as "PG") of a number determined per one revolution or rotation of the sewing machine. The reference numeral 7 denotes a cloth retaining unit for pressing and clamping an article to be sewed; 8, a slide plate; 9, a two-axis drive mechanism for two-dimensionally moving the cloth retaining unit 7 on the slide plate 8 in accordance with a predetermined pattern; 10 and 11, origin detectors for detecting mechanical origins of respective two axes which are arranged in the two-axis drive mechanism 9; and 12, a control unit for generally controlling the operation of each of the above-describe sections.
Arranged on the control unit 12 are power switches 13 and a magnetic memory writing unit (hereinafter referred to as "FDD") 14 which executes reading and writing with respect to a floppy disc (hereinafter referred to as "FD") (not shown). Connected to the floppy disk drive (FDD) 14 are a console panel 15 for setting a sewing pattern, a sewing speed and the like, a start switch 16 for giving a sewing start command, a foot pedal 18 provided with a switch (hereafter referred to as "cloth retaining switch") 17 for pressing and clamping the cloth retaining unit 7, and a stop switch 19 for stopping sewing.
Arranged on the console panel 15 are a liquid-crystal display unit (hereinafter referred to as "LCD") 20 in which information such as procedure of operation, present or current sewing conditions, error massages and the like are displayed on a screen, a reset switch 21 for positioning the two-axis drive mechanism 9 to a predetermined position to reset a system, a test switch 22 for driving the two axes in accordance with the sewing data without rotating the spindle of the sewing machine, a speed setting switch 23 for switching a rotational speed of the drive motor 4 at sewing, and a group of various switches 24 for designating preparation, calling and erasing of predetermined sewing relevant data.
FIG. 26 is a block diagram showing a schematic arrangement of the control unit 12. The reference numeral 27 denotes a microcomputer that is the center of a control circuit; 28, a quartz oscillator for generating a fundamental frequency in order to operate the microcomputer 27; 29, an address latch circuit for latching an address of a memory; 30, a memory data buffer for transmitting data from the memory to the microcomputer 27, or data from the microcomputer 27 to the memory; and 31, a peripheral data buffer for transmitting data from the microcomputer 27 to peripheral elements other than the memory, or from the peripheral elements to the microcomputer 27.
Further, the reference numeral 32 denotes an IC-selective-signal generating circuit (hereinafter referred to as "decoder") which generates various IC selective signals for singly selecting the memory and the peripheral elements; 33, a readable and writable memory element (hereinafter referred to as "RAM"); 34, a non-volatile memory element exclusively for reading (hereinafter referred to as "ROM"); 35, an I/O for controlling various parallel input signals; 36, a motor drive circuit for driving the motor 4 for the sewing machine; 37-39, input interfaces to which various control signals are inputted, for inputting the control signals to the I/O 35; and 40, a stepping-motor driver for receiving feed pulses generated by the microcomputer 27 through the I/O 35, to drive a stepping motor included or contained in the two-axis drive mechanism 9.
Furthermore, the reference numeral 41 denotes a solenoid drive circuit for driving a thread-cutting solenoid 42 and the like; 43, a power circuit for supplying an electric power to the control circuit; 44-49, connectors for executing repetition or junction between various signal lines; 50, a feed-pulse delay circuit (hereinafter referred to as "count-borrowing circuit") for generating timing at which a feed pulse of the microcomputer 27 is generated by data outputted from the I/O 35 and a signal from the detector 6; and 51, an interrupt controller for receiving a signal from the count-borrowing circuit 50 and the detector 6 through the input interface circuit 37 to generate an interrupt signal to the microcomputer 27.
FIG. 27 is a block diagram showing the details of count-borrowing circuit 50. Components and parts applied by reference numerals the same as or identical with those in FIG. 26 have the same functions, and the description of the same or identical components and parts will be omitted here. The reference numeral 52 denotes a down counter for counting PG signals from the detector 6 and the signal from the I/O 35; 53, an OR circuit for preventing a borrowing signal from being generated when the counter is cleared; and 54, a latch circuit (flip-flop circuit) for latching a BR signal outputted from the down counter 52.
FIG. 28 is an example of a circuit which is capable of being arranged in substitution for the count-borrowing circuit 50 illustrated in FIG. 27. The reference numerals 55 and 56 denote AND elements; 57 and 58, flip-flop circuits; and 59 and 60, one-shot circuits. The reference numeral 61 denotes a preset type down counter; 62, an up counter; 63 and 64, module counters; 66, a PG signal from the detector 6; 67, a needle-lower-position signal from the detector 6; 68, a reset signal; 69-X and 70-Y, movement data in an X-direction and a Y-direction outputted from the I/O 35; and 71 and 72, stepping-motor drive command signals (hereinafter referred to as "pulses") outputted from the module counters 63 and 64.
FIG. 29 is a part of an internal circuit of the stepping-motor driver 40 for driving a pair of stepping motors 25 and 26, which is a drive circuit for driving one of windings, that is, an A-phase winding 85 of windings of the stepping motor 25. The reference numeral 73 denotes an XAP signal for generating a signal when current flows through the A-phase winding 85 in a direction indicated by a one-dot-and-chain line 86; and 74, an XAN signal for generating a signal when current passes in a direction of the A-phase winding 85 in a direction indicated by the broken line.
Moreover, the reference numerals 76 and 78 denote base drive circuits for driving a pair of transistors 82 and 84, respectively; 80, a shunt resistor for detecting current flowing through the A-phase winding 85; 79, an error amplifying circuit for amplifying a difference between a value of the current detected by the shunt resistor 80 and a requisite current value; 75 and 77, comparators for applying a shopper signal to a pair of transistors 81 and 83, based on a difference amplified by the error amplifying circuit and command values of the XAP signal and the XAN signal. A base drive circuit is included for driving bases of the respective transistors 82 and 84.
Operation of the conventional automatic sewing machine as described above will be described. In this connection, the detailed operation of circuit views in FIGS. 25-28 has been described in detail in Japanese Patent Publication No. SHO 60-29515 and Japanese Patent Publication No. SHO 60-54076 and the description thereof will be omitted here. The stepping-motor driver and a feed system will hereunder be described.
Operation of the stepping-motor driver will be describe with reference to FIGS. 29 and 30. First, a case where current flows through the A-phase winding 85 in a direction indicated by the one-dot-and-chain lines 86 will be described. In case where the XAP signal is 1, and the XAN signal is 0, the transistors 81 and 84 are turned ON so that current flows from a power source 90 to the transistor 84 through the A-phase winding 85, and current flows through the shunt resistor 80. At this time, a voltage value corresponding to the current is generated at a point C of the shunt resistor 80.
A difference between the voltage value at the point C and the voltage value at the point B 89 is amplified by the error amplifier 79. If the voltage at the point B 89 is in agreement with the voltage at the point C, an output A 88 from the error amplifier 79 is brought to 0 so that the transistor 81 is turned OFF by the circuit 75 having incorporated therein the comparator. After the transistor 81 has been turned OFF, the current continues to flow by a reactance part and a resistance part of the motor per se in spite of the fact that the transistor 81 is turned OFF. However, the current soon begins to fall or descend gradually.
When the current falls and the voltage at the point C is lowered to less than the voltage at the point B, the output A 88 from the error amplifier 79 is not brought to 0, but increases in a direction of plus. Thus, the circuit 75 having incorporated therein the comparator turns ON the transistor 81. By continuation of the above-description operation, the current in the direction indicated by the one-dot-and-chain line 86 flows constant. Operation of the broken lines 87 that is the direction of the current flowing through the A-phase winding is the same as the case of the one-dot-and-chain line 86, and the description thereof will be omitted.
FIG. 30(A) is a diagrammatic view for explanation of a two-phase stepping motor which is composed of an A-phase winding, a B-phase winding and a rotor. The direction of the current in FIG. 29 is such that the one-dot-and-chain line 86 is indicated by XAP in FIG. 30(A), while the broken line 87 is indicated by XAN. Further, although the B-phase winding has not been described, a circuit equivalent to that illustrated in FIG. 29 actually exists also in the B-phase winding so that the current that is XBP and XBN flows.
Here, a case of two-phase excitation illustrated in FIG. 30(B) will be described. XAP is excited in a step 1. That is, current flows in a direction indicated by I.sub.1 in FIG. 30(D). Next, XBP is excited in a step 2. That is, a torque is generated in a direction indicated by 13 in FIG. 30(D). At the step 3, XAN is excited so that a torque is generated in a direction indicated by 15 in FIG. 30(D). At a step 4, XBN is excited to generate a torque in a direction of I.sub.7 in FIG. 30(D). After the step 4, a program is also returned to the step 1 so that the current flows while the direction of the torque successively is moved angularly or rotates. Here, the arrangement is generally such that an angle 90.degree. between XAN and XBP expressed diagrammatically is 1.8.degree. by an arrangement of the winding of the stepping motor.
Next, 1-2 phase excitation will be described. As shown in FIG. 30(C), at a step 1, XAP is excited to generate the torque in the direction I.sub.1 in FIG. 30(D). Next, at a step 2, XAP and XBP are excited to generate the torque in the direction I.sub.2. Consequently, the direction of the torque successively rotates like I.sub.1 .fwdarw.I.sub.2 .fwdarw.I.sub.3 .fwdarw.I.sub.4 .fwdarw.I.sub.5 .fwdarw.I.sub.6 .fwdarw.I.sub.7 .fwdarw.I.sub.8 .fwdarw.I.sub.1 in FIGS. 30(C) and 30(D), whereby the stepping motor rotates. Here, it will be understood or appreciated that, assuming that operation is made through 1.8.degree. by a single excitation change in case of 2 phase excitation, then operation will be made through 0.9.degree. in case of the 1-2 phase excitation. By this arrangement, driving of the X-Y table is executed, and the 2-axis drive mechanism 9 is arranged such that the X-Y table operates through 0.2 mm at 0.9.degree.. Next, two (2) methods of driving the two-axis drive mechanism at feed will be described.
1 First Drive Method
A first drive method is a drive method in case where the circuit illustrated in FIG. 28 is used. This feed method will be described with FIG. 31(A) and FIG. 31(B) used. Generally, the pair of module counters 63 and 64 have fundamental pulses as illustrated in FIG. 31(A). In case where it is desired to output three (3) pulses, locations at 1 and 2 of the fundamental pulses are outputted. FIG. 31(B) is a figure showing a typical example thereof, illustrating both cases where thirty-five (35) pulses are outputted and where twelve (12) pulses are outputted. In the case of thirty-five (35) pulses, 32, 2 and 1 of the fundamental pulses are outputted, while, in the case of twelve (12) pulses, 8 and 4 of the fundamental pulses are outputted. It is to be noted here that, in a case where the module counters 63 and 64 are used, the same period of time is required in case where one pulse is outputted and in case where sixty-two (62) pulses are outputted, as illustrated in FIG. 32.
2 Second Drive Method
As a second drive method, there is a drive method in case where the circuit illustrated in FIG. 27 is used. This method is a method in which pulses are outputted every predetermined cycle by software. In FIG. 33(A), in the case where feed is executed from V to W, movement is made in a direction .beta. illustrated in FIG. 33(A) in the first drive method. outputting of the pulses at this time is illustrated in FIG. 33(C). On the other hand, in the second drive method, movement is made in a direction .alpha.. This is such that a required number of the pulse outputs between V and W is first computed, feed subsequently starts simultaneously for the X-axis and the Y-axis, and a short one is completed early, whereby a uniform pulse arrangement is given both for the X-axis and the Y-axis. This is shown in FIG. 33(B).
Since the conventional control apparatus for the automatic sewing machine has been constructed as described above, the following problems have arisen. That is, in the drive method in case where the circuit illustrated in FIG. 28 is used, the pulses move linearly as indicated by .beta. in FIG. 33(A), but the pulses are not outputted uniformly in time. Further, since the cycle T is constant, stepping-out occurs if the speed of the two-axis drive mechanism rises.
Furthermore, the drive method in case where the circuit illustrated in FIG. 27 is used has the following problem. That is, movement does not occur linearly until an objective or intended location as indicated by .alpha. in FIG. 33(A). Moreover, since the two-axis drive mechanism is driven at a constant or predetermined speed, stepping-out occurs at a point where the two-axis drive mechanism starts to operate and a point where the two-axis mechanism stops. Further, in case where the two-axis drive mechanism is driven at a high speed, the following problem arises. That is, in spite of the fact that the movement command pulses are outputted uniformly, weight and friction of the two-axis drive mechanism cause actual movement of the two-axis drive mechanism to oscillate like an actual movement curve. By this oscillation, stepping-out occurs.
Furthermore, there is also the following problem. Specifically, in case where a cylinder and the like are loaded on the cloth retaining frame as occasion demands, since their weight is heavy, the oscillation in FIG. 34 increases more than in the case where their weight is light. The vibration can become too excessive under this overload condition because the stepping motor does not provide feedback control thus resulting in a loss of control. This phenomenon is referred to as stepping out.
Moreover, the following problem also arises. That is, in the 1-2 phase excitation as shown in FIG. 30(D), ripple of the torque occurs. For this reason, the stepping motor oscillates so that stepping-out occurs.
Further, the following problem also arises. That is, generally, the stepping motor has such a characteristic that an increase in rotational speed reduces the torque. Thus, stepping-out occurs.